/*
 *  guid.cc
 *  Untitled
 *
 *  Created by Ben Nolan on 2/11/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#include "guid.h"

#include <sstream>
#include <iomanip>

namespace Wonderland {
	Guid::Guid(std::string s){
		std::istringstream iss(s);
		iss >> std::setbase(16) >> guid_;
	}

	std::string Guid::toString() const{
		std::stringstream ss;
		ss << std::hex;
		ss << guid_;
		return ss.str();
	}

	std::ostream& operator << (std::ostream &os,const Guid &g){
		  os << g.toString();
		  return os;
	}
	
}